// pages/favorite/favorite.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    data:[],
    noConnect:false
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this
    var userinfo = wx.getStorageSync('userinfo')
    wx.request({
      url: getApp().globalData.url+'mine/',
      data:{
        type:"completed",
        openid:userinfo.openid
      },
      success:function(res){
        that.setData({
          data:res.data.reverse()
        })
      },
      fail:function(res){
        that.setData({
          noConnect:true
        })
      }
    })
  },


})